package designpattern.proxy;

import designpattern.proxy.Static.ReallyDoSubject;
import designpattern.proxy.Static.Subject;

public class StaticProxy implements Subject {

    private final ReallyDoSubject reallyDoSubject;

    public StaticProxy(ReallyDoSubject reallyDoSubject) {
        this.reallyDoSubject = reallyDoSubject;
    }

    @Override
    public void request() {
        System.out.println("我是中介-----我将主要业务交给别人去做，我做其他事情去了");
        reallyDoSubject.request();
        reallyDoSubject.response();
        reallyDoSubject.around();
        System.out.println("交给别人的事情做好了，我现在来收钱");
    }

    @Override
    public void response() {

    }

    @Override
    public void around() {

    }
}
